<template>
	<view v-if="isVerify" class="not-open">
		该功能暂未开通
	</view>
	<view v-else class="main-box">
		<emptyState></emptyState>
		<view>
			<image id="form-box" mode="widthFix" class="bg-image" src="https://web.78keji.cn/images/yybg.png"></image>
			<view class="index-all-content-box">

				<view class="main-form-box">


					<yyzc :mobile="formData.mobile" :param="formData.param" :submit="formData.submit"
						:baseImagePath="imagePath" ></yyzc>
				</view>
			</view>
			<!-- <image id="form-box" mode="widthFix" class="bg-image" src="https://web.78keji.cn/images/btn13.png"
				style="margin-top: 30rpx;animation: butChange 1s infinite;" ></image> -->
		<!-- 	<button class="btnx" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
				style="position: absolute;z-index: 2;width: 90%;top: 110rpx;background-color: none;">


			</button>
			<view class="d_f j_c_c">
				<image class="mobile-btn" mode="widthFix" src="https://web.78keji.cn/images/btn13.png" @error="err"
					style="position: absolute;width: 550rpx;top: 1100rpx;">
				</image>
			</view> -->
			
		</view>


	</view>
</template>

<script>
	import httpUtil from "@/utils/httpUtil";
	import commonApi from "@/api/commonApi";
	import userApi from "@/api/userApi";
	import logApi from "../../api/logApi";
	import paramApi from "../../api/paramApi";
	import mobileApi from "../../api/mobileApi";
	import zfbUrlUtil from "../../utils/zfbUrlUtil";
	import {
		tongji,
		status,
		paySwiping
	} from "../../api/indexzw.js"
	export default {
		data() {
			return {
				isVerify: false,
				scrollTop: 0,
				imagePath: 'https://h5.sx2b2c.com/images/pingzhi_shenghuo_dahuiyuan/zhifubao_mini/banpin/',
				scrollToTargetId: "form-box",
				a: "",
				formData: {
					mobile: '',
					param: '',
					submit: 0,
					intervalId: '',
				}
			}
		},
		onLoad(option) {
			this.initData(option)
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop
		},
		methods: {
		
			submit() {

			},
			uuid() {
				var s = [];
				var hexDigits = "0123456789abcdef";
				for (var i = 0; i < 36; i++) {
					s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
				}
				s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
				s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
				s[8] = s[13] = s[18] = s[23] = "-";

				var uuid = s.join("");
				uni.setStorageSync('uuid', uuid)
				return uuid;
			},
			initData(option) {


				if (!userApi.getUserId()) {
					userApi.initUserId()
				}
				if (option.a) {
						httpUtil.setA(option.a)
					this.a = option.a
					status({
						channelCode: option.a,
						productCode: 'LH2566',
					}).then((res) => {
						tongji({
							channelCode: option.a,
							productCode: 'LH2566',
							uuid: this.uuid()
						}).then((res) => {

						})
					})
				} else {
					uni.reLaunch({
						url: '/pages/404/404'
					})
				}


			},
		
		}
	}
</script>

<style lang="scss">
	.btnx{
		background: none;
		border: none;
		height: 160rpx;
	}
	.mobile-btn {
		background: none;
		padding: 0;
		margin: 0;
		border: none;
		animation: butChange 1s infinite;
		box-shadow: none;
		border-style: none;

		padding-bottom: 20rpx;


		border::after {
			background: none;
			padding: 0;
			margin: 0;
			border: none;
			content: none;
			border-style: none;
		}

		.submit-btn {

			width: 90%;
			height: auto;
			display: block;
			margin: 0 auto;

		}

	}

	@keyframes butChange {
		0% {
			transform: scale(1);
		}

		50% {
			transform: scale(1.1);
		}

		100% {
			transform: scale(1);
		}
	}

	.not-open {
		height: 100vh;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000;
	}

	.main-box {
		position: relative;
		background: linear-gradient(90deg, #010920, #010920, #010920);



		min-height: 100vh;

	}

	.main-form-box {
		width: 90%;
		// position: absolute;
		// left: 5%;
		// bottom: 10vh;
		margin: 10rpx auto 0;
	}

	.bg-image {
		width: 100%;
		height: auto;
	}

	.index-all-content-box {
		position: absolute;
		left: 0;
		top: 93vw;
		width: 100%;
	}

	.mobile-roll-left-box {
		position: relative;

	}

	.bottom {

		color: #FFFFFF;
		display: flex;
		justify-content: center;
		font-size: 22rpx;
		width: 100%;
	}
</style>